import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class lianxi7 {
    public static void main(String[] args) throws IOException {
        FileOutputStream fid=new FileOutputStream("C:\\3\\123.jpeg");

        int num=0;
        for (int i = 0; i < 6; i++) {
            num++;File file=new File("C:\\1.1\\123" + num + ".jpeg");
            FileInputStream str = new FileInputStream(file);
             byte[] bytes=new byte[(int)(file.length())];
            int read = str.read(bytes);
            fid.write(bytes,0,read);


        }
        }


    }

